package com.frxuexi.sign

import com.frxuexi.lib_base.ApiResponse
import com.frxuexi.lib_base.BaseRepository
import com.frxuexi.lib_http.HttpType
import com.frxuexi.lib_http.NetWorkFactory
import kotlinx.coroutines.flow.Flow
import okhttp3.RequestBody
import retrofit2.http.Body
import javax.inject.Inject

@OptIn
class SignRepository @Inject constructor():BaseRepository() {

    val apiService by lazy { NetWorkFactory.factory(HttpType.NONE).create(ApiService::class.java) }

    fun getSings(map: Map<String,Int>): Flow<ApiResponse<List<SignEntity>>>{
        return apiService.getSings(mapToJson(map))
    }

    fun sign(map: Map<String,Any>):Flow<ApiResponse<List<SignEntity>>>{
        return apiService.sign(mapToJson(map))
    }
}